#ifndef _CONF_H_
#define _CONF_H_
#include "cocos2d.h"
#include "CMemoryFile.h"

using namespace cocos2d;
using namespace io;
using namespace std;

namespace fireplane
{
	class Conf 
	{
	public:
		#define CONF_STRCMP(x,y)  !strncmp(x,y,strlen(y))	
		typedef map<string,string> ConfMap;
		static Conf* getConf();
		void loadConf(int level);
		void _loadConfFile(CMemoryFile* file);
	    
		char* trimString(char *str);
		char* _trimLeft(char *str);
	    char* _trimRight(char *str);

		int getInt(string name);
		string Conf::getStr(string name);
		float Conf::getFloat(string name);

private:
		Conf();
		~Conf();
		static Conf* _s_Conf;
		ConfMap _all_conf_map;
	};

}

#endif